﻿using System;
using System.Collections.Generic;

using System.Web;
using System.Web.Mvc;
using ContactManager.Models.Validation;

namespace ContactManager.Controllers
{
    public class ControlerHelpers
    {
        public ControlerHelpers() { }

               public static void  AddModelStateErrors(ref ValidationState vst,ref ModelStateDictionary modelState)
               {
                foreach (ValidationError error in vst.Errors)
                {
                    modelState.AddModelError(error.Property, error.Message);
                }
               }
    }
}
